package com.example.xgakj.securityguard.ui.activities;

import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.view.View;

import com.example.xgakj.securityguard.R;
import com.example.xgakj.securityguard.base.BaseActivity;
import com.qmuiteam.qmui.widget.QMUITopBar;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author shurun
 * @date 2017/10/15
 */
public class MainActivity extends BaseActivity {

    @BindView(R.id.topbar)
    QMUITopBar mTopBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        initToolbar();
    }

    protected void initToolbar() {
        mTopBar.addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        mTopBar.setBackgroundColor(ContextCompat.getColor(this, R.color.app_color_theme_4));

        mTopBar.setTitle("保安接警");
    }
}
